#include <stdio.h>
#include <pthread.h>
#include <unistd.h>

void* func( void* agr )
{
	printf("线程创建成功\n");
	//printf("a = %d", (int)agr);
	printf("进程id = %d, 线程ID = %lu\n",getpid(), pthread_self());
}



int main()
{
	pthread_t tid;
	int ret;
	int a = 5;
	//线程创建
	ret = pthread_create(&tid, NULL, func, NULL);
	sleep(1);
	printf("线程ID = %lu\n", tid);
	return 0;
}
